package com.baiwang.bwbaselib;


import android.content.Context;

import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.baiwang.bwbaselib.network.NetWorkCenter;


/**
 * Created by ljgsonx on 2016/1/15.
 */
public class LibCenter {

    private static RequestQueue mRequestQueue;

    private static LibCenter mLibCenter;

    private LibCenter(Context context) {
        mRequestQueue = NetWorkCenter.getQueue(context);
    }

    public static LibCenter getLibCenter(Context context){
        if(null == mLibCenter)
            mLibCenter = new LibCenter(context);
        return mLibCenter;
    }

    public <T>void doNetWorkReq(Request<T> request){
        mRequestQueue.add(request);
    }


}
